<template>
    <!--index.wxml-->
    <view class="detai-template">

        <view class="sec_item ul parts">

          
            <view class="marekt" v-if="showMarkt">
                
                <view class="marketInfo">
                
                    <image class="imgBox" :src="$getImg( json.flashSupermarketModel.logo )" mode="aspectFit" lazy-load="false"/>
                 
                    <view class="info-right">
                        <view  class="market-name">
                            {{ json.flashSupermarketModel.name }}
                        </view>
                        <view  class="market-addr">
                            {{ json.flashSupermarketModel.address }}
                        </view>     
                    </view>
                          
                </view>
                  
            </view>
              
            <view class="head-tit">
                <text>商品信息</text>
            </view>


            <view class="li" v-for=" goodsItem,idx in json.orderGoodsModelList" :key='goodsItem.id'>
                <view class="p productBox">
                    <view class="imgs">
                        <image :src="goodsItem.listPictureSrc" mode="aspectFit" :lazy-load="true"></image>
                    </view>
                    <view class="info">
                        <view class="info-l">
                            <view class="name text-delic2">
                                <text class="">
                                    {{ goodsItem.goodsName }}
                                </text>
                            </view>
                            <view class="bottom">

                                <view class="nums">
                                    <text>
                                        x {{goodsItem.goodsNum  }}
                                    </text>
                                </view>

                            </view>
                        </view>
                        <view class="info-r">
                            <view class="price">
                                <text class="min">￥</text> {{ goodsItem.payMoney }}
                            </view>
                        </view>
                    </view>
                </view>
            </view>
           
            <view class="priceBox text-right">

                <view class="fl code"  >
                    <text class="min">运费：</text><text class="">￥{{ json.feeOrderYuan }}</text>
                </view>

                <text class="min">合计:</text><text class="price-col big"> <text class="min">￥</text>{{json.orderMoney }}</text>
            </view>
        </view>

        <view class="parts" v-if="json.userAddressModel">
            <view class="head-tit">
                <text>收货人信息</text>
            </view>

            <view class="line">

                <view class="l">
                    <text class="">收货人</text>
                </view>
                <view class="r none">
                    <text>{{ json.userAddressModel.contacts}}</text> <text class="f24">({{ json.userAddressModel.sex == 1 ? '先生' : '女士' }})</text> 
                </view>
            </view>
            <view class="line">

                <view class="l">
                    <text class="">联系电话</text>
                </view>
                <view class="r none">
                    <text>{{ json.userAddressModel.contactsPhone}}</text>
                </view>
            </view>
            <view class="line">

                <view class="l">
                    <text class="">详细地址</text>
                </view>
                <view class="r none">
                    <text>{{ json.userAddressModel.location}} {{ json.userAddressModel.houseNumber}}</text>
                    <view class="f22 col-hui">{{json.userAddressModel.deliveryAddress}}</view>
                </view>
            </view>

        </view>

        <view class="parts">
            <view class="head-tit">
                <text>订单信息</text>
            </view>

            <view class="line">

                <view class="l">
                    <text class="">下单时间</text>
                </view>
                <view class="r none">
                    <text>{{ json.createTime}}</text>
                </view>
            </view>
            <view class="line">

                <view class="l">
                    <text class="">订单编号</text>
                </view>
                <view class="r none">
                    <text>{{ json.orderNumber}}</text>
                </view>
            </view>
            <view class="line" v-if="json.remark">

                <view class="l">
                    <text class="">备注信息：</text>
                </view>
                <view class="r none">
                    <text>{{ json.remark}}</text>
                </view>
            </view>

            <!-- <view class="line" v-if="json.dispatcherId">

                <view class="l">
                    <text class="">配送人员</text>
                </view>
                <view class="r none">
                    <text>{{ json.dispatcherUser.mobile}}</text>

                    <text @click="$takePhone(json.dispatcherUser.mobile)" class="iconfont icon-dianhua col-green ml10 f36"></text>
                    
                </view>
            </view> -->
              

        </view>

    </view>
</template>
<script>

const app = getApp();
export default {
    props: ['json','showMarkt','isUser'],
    components: {},
    data () {
        return {

        }
    },
    computed: {

    },
    mounted () {

    },
    methods: {

    }
}
</script>
<style lang="scss" scoped>
.head-tit {
    font-weight: bold;
    color: #000;
    font-size: 28rpx;
    margin-bottom: 20rpx;
}
.line {
    color: #565656;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 10rpx 0;
    .l {
        text-align: left;
        margin-left: 10px;
        max-width: 500rpx;
        min-width: 160rpx;
    }
    .r {
        flex: 1;
        width: 100%;
        // border-bottom: 1rpx solid #f1f1f1;
        // padding-bottom: 20rpx;
        &.none {
            border: none;
        }
    }
    .b {
        // font-weight: bold;
    }
    .min {
        font-size: 24rpx;
    }
    ::v-deep .holderClass {
        color: #c1c1c1;
    }
    .icon {
        color: #c1c1c1;
        font-size: 24rpx;
        line-height: 38rpx;
    }
    .address {
        font-size: 22rpx;
        color: #565656;
    }
}
.priceBox {
    padding: 10rpx 0rpx 10rpx;
    font-size: 34rpx;
    .min {
        font-size: 24rpx;
    }
    .code{
        // font-size: 36rpx;
        // font-weight: bold;
    }
    .big{
        font-size: 40rpx;
    }
}
.marekt{
    .marketInfo{
        display: flex;
        margin-bottom: 30rpx;
        .imgBox{
            width: 80rpx;
            height: 80rpx;
            background: #f6f6f6;
            border-radius: 10rpx;
            margin-right: 20rpx;
        }
        .info-right{
            flex: 1;
            .market-name{
                font-size: 28rpx;
                color: #000;
                margin-bottom: 4rpx;
            }
            .market-addr{
                font-size: 24rpx;
                color: #888;
            }
        }
    }
}

// 商品
.sec_item {
    padding-top: 28rpx;
    .li {
        padding: 10rpx 0rpx;
    }
    // border-bottom: 1px solid #f1f1f1;

    .productBox {
        display: flex;
        .imgs {
            margin-right: 20rpx;
            image {
                width: 140rpx;
                height: 140rpx;
                background: #f1f1fe;
                border-radius: 6rpx;
            }
        }
        .info {
            display: flex;
            width: 100%;
            .info-l {
                flex: 1;
            }
            .info-r {
                text-align: right;
                min-width: 150rpx;
                margin-left: 10rx;
                font-size: 30rpx;
                .min {
                    font-size: 22rpx;
                }
            }
            .name {
                font-size: 26rpx;
                color: #000;
                font-weight: bold;
            }
            .bottom {
                // padding-top: 10rpx;
                overflow: hidden;
                .nums {
                    float: left;
                    color: #888;
                    font-size: 26rpx;
                    margin: 6rpx 0;
                    // .old-price {
                    //     margin-left: 10rpx;
                    //     text-decoration: line-through;
                    // }
                    // .col-red {
                    //     font-size: 30rpx;
                    // }
                    // .mini {
                    //     font-size: 26rpx;
                    // }
                }
                .buy-btn {
                    margin: 6rpx 0;
                    float: right;
                    min-width: 140rpx;
                    text-align: right;
                }
            }
        }
    }
}
</style>